<template>
<!-- 市场 -->

<div id="stu">

  <mu-flex justify-content="center" align-items="center">

    <mu-button color="primary" full-width round large @click="Configuration">配置设备</mu-button>

  </mu-flex>
  <mu-flex style="margin-top:1rem;" justify-content="center" align-items="center">

    <mu-button color="success" full-width round large @click="$refs.create_sbsb.create_show_fn()">添加设备</mu-button>

  </mu-flex>
  <!--添加设备填写内容-->
  <create_sb :value="value" ref="create_sbsb"></create_sb>
</div>
</template>


<script>
import create_sb from '../../components/sc/create_sb'

export default {

  name: 'sc',

  components: {
    create_sb
  },

  computed: {},

  data() {

    return {

      value: {
        dev_name: '', //模块命名

        sblx: '', //设备类型

        us_id: '507', //用户ID号

        dev_id: '', //设备id

        device_name1: '', //第一路命名

        device_name2: '', //第二路命名

        Typesof: 1, //添加与修改判断  1为添加  2为修改

      },

    }

  },


  methods: {

    Configuration() { //配置设备

      this.$confirm('将需要添加的设备处于断电状态，并准备好无线局域网？(配置完设备后，返回该页面再点击添加设备即可）',
       '提示', {type: 'warning'}).then(result => {
          if(result.result){// 点击了确定
              window.open('http://www.ydsyb123.cn/wifi/airkiss.php'); //跳转外部链接配置设备
          }
        })
      }

  },

  mounted() {
    this.$store.state.btnnum = 1;


  }
}
</script>

<style scoped="scoped">
   @import "../../assets/css/hua.css";
      #stu{
        width: 100%;
        height: 15rem;
        padding:5.5rem 1rem;
      }

</style>
